This forum is closed to new posts and
responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:
Hi,
when I tried to use iText to create a simple PDF file, the system generated error "No message found for 1.not.found.as.resource" after the command document.add(paragraph).
Obviously, the command documet.close() throws another error: "document has no pages".
This is the code (inside a onclick event of a button):
try {
var doc:com.itextpdf.text.Document = new com.itextpdf.text.Document(com.itextpdf.text.PageSize.A4);
var writer = com.itextpdf.text.pdf.PdfWriter.getInstance(doc,new java.io.FileOutputStream("test.pdf"));
doc.open();
var p:com.itextpdf.text.Paragraph = new com.itextpdf.text.Paragraph("Hello world!");
doc.add(p); // error
doc.close();
}
catch(e) {
print(e.message);
}
Can you help me?
TIA
Feedback number WEBB8BKFLF created by ~Vijay Ekboosizennivu on 11/26/2010
Status: Open
Comments: